package com.qi.spzx.manager.service.impl;

import com.qi.spzx.manager.mapper.ProductDetailsMapper;
import com.qi.spzx.manager.service.ProductDetailsService;
import com.qi.spzx.model.entity.product.ProductDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description TODO
 * @Author dingchunlin
 * @Date 2024/2/23 19:22
 * @Version 1.0.0
 */
@Service
public class ProductDetailsServiceImpl implements ProductDetailsService {

    @Autowired
    private ProductDetailsMapper productDetailsMapper;

    @Override
    public String getDetailsByProductId(Long productId) {
        return null;
    }

    @Override
    public void save(ProductDetails productDetails) {
        productDetailsMapper.save(productDetails);
    }

    @Override
    public ProductDetails selectByProductId(Long id) {
        ProductDetails productDetails = productDetailsMapper.selectByProductId(id);
        return productDetails;
    }

    @Override
    public void updateById(ProductDetails productDetails) {
        productDetailsMapper.updateById(productDetails);
    }

    @Override
    public void deleteByProductId(Long id) {
        productDetailsMapper.deleteByProductId(id);
    }
}
